package com.cloudfun.campusshare.entity;

import com.cloudfun.campusshare.common.constant.ProductType;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;

/**
 * 设备元模式
 * Created by Huqin on 2020/4/20
 */
@Data
@Entity
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "device_meta_mode")
public class DeviceMetaModeEntity extends BaseEntity {

    @Id
    @GenericGenerator(name = "id_uuid", strategy = "uuid")
    @GeneratedValue(generator = "id_uuid")
    @Column(unique = true, columnDefinition = ("varchar(40) not null comment '主键uuid'"))
    private String id;

    @Enumerated(EnumType.STRING)
    @Column(columnDefinition = ("varchar(40) not null comment '产品类型'"))
    private ProductType productType;

    @Column(columnDefinition = ("varchar(40) not null comment '设备型号/设备类型'"))
    private String deviceType;

    @Column(columnDefinition = ("int(3) default null comment '时间'"))
    private Integer time;

    @Column(columnDefinition = ("varchar(40) not null comment '名称'"))
    private String name;

    @Column(columnDefinition = ("varchar(40) default null comment '品牌'"))
    private String brandId;

    @Column(name = "status", columnDefinition = ("tinyint(1) default null comment '删除状态 1:未删除 0:删除'"))
    private Boolean status;

}
